<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //筛选数组法1：未调用方法
        var arr = [18,65,48,32,79,84,94,69];
        var j = 0;
        var newArr = [];
        for(var i = 0; i < arr.length; i++){
            if(arr[i] >= 70){
                newArr[j++] = arr[i];
            }
        }
        console.log(newArr);

        //筛选数组法2:调用push方法
        var arr = [18,65,48,32,79,84,94,69];
        var newArr = [];
        for(var i = 0; i < arr.length; i++){
            if(arr[i] >= 70){
                newArr.push(arr[i]);
            }
        }
        console.log(newArr);
    </script>
</head>
<body>
    
</body>
</html>